package cn.tedu.springmvc01.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller//用于标记当前类属于控制层,负责处理用户的请求,并将结果响应给用户
public class HelloController {
    @RequestMapping("/hello")
    @ResponseBody
    public String Hello(){
        System.out.println("Hello方法被执行了");
        return "Hello方法";
    }

    @RequestMapping("/hello01")
    @ResponseBody
    public String Hello01(){
        System.out.println("Hello01方法被执行了");
        return "Hello01方法";
    }


}
